feat(mcp): #3167 PR-B — stdio/HTTP off-switch split + os dev connect UX + exposure-policy docs#3217
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 5 package(s): 30 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os dev connect UX
…he MCP endpoint on `os dev` boot (#3167) #3167 PR-B — the direction-ratified, non-overlapping half. The HTTP identity-admission e2e proof landed separately (#3228: showcase-based, HIGH-RISK); this rebases onto it and keeps only what that PR did not cover. Decision 2 (off-switch semantics): the MCP HTTP surface and the long-lived stdio transport shared one env var — OS_MCP_SERVER_ENABLED=true turned HTTP on AND silently auto-started the UNSCOPED stdio bridge (raw services, no per-request principal). Split them: - types: new resolveMcpStdioAutoStart(); stdio is now OS_MCP_STDIO_ENABLED (default off). OS_MCP_SERVER_ENABLED governs only HTTP. Legacy OS_MCP_SERVER_ENABLED=true still starts stdio for one release, flagged deprecated (=false only ever gated HTTP, unchanged). - mcp: plugin.start() gates stdio on the new switch + warns once on the legacy alias. The bridgeResources(...) line (mcp-stdio-authority probe key) is untouched; the matrix row's env-var references are synced. Decision 3 (dev affordance): `os dev` prints the MCP endpoint, skill URL, and a ready-to-paste `claude mcp add` command on boot, gated on isMcpServerEnabled() (opted-out deployments advertise nothing). Decision 4 (exposure policy): documented the current default (non-system objects + ai.exposed actions over the ~10-tool spine) as the committed v1 policy in connect-mcp.mdx, with the metadata-authorable direction noted. Also: env-var docs updated for the split (+ deprecation callout); the blank scaffold README documents the serve-side MCP surface; unit tests pin the new switch semantics (canonical / legacy-deprecated / footgun-closed). Changeset covers types+mcp+cli (minor) and create-objectstack (patch). Refs #3167, #3228, ADR-0096, ADR-0097. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0115eg8dAaCfWaDYYAm3ma36
os-zhuang
force-pushed
the
claude/mcp-server-default-wiring-ydcj2n
branch
from
July 18, 2026 16:21
4b88f9a to
192a079
Compare
os dev connect UXos dev connect UX + exposure-policy docs
os-zhuang
marked this pull request as ready for review
July 18, 2026 16:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
#3167 的 PR-B,方向已拍定的非重叠部分。
审计确认:serve-side 插件早已默认接线(
serve.ts:isMcpServerEnabled()→requires.push('mcp')),HTTP 面早已准入且现已被 #3228 的 e2e 证明钉死。本 PR 补齐剩下的收口 + 可发现性 + 政策成文。改动(单 commit)
OS_MCP_SERVER_ENABLED=true开 HTTP 的同时静默启动无 principal 的裸权限 stdio 桥。拆开:@objectstack/types新增resolveMcpStdioAutoStart();stdio 归OS_MCP_STDIO_ENABLED(默认关),OS_MCP_SERVER_ENABLED只管 HTTP。旧=true触发 stdio 保留一 release + deprecation 警告;=false语义不变。@objectstack/mcpplugin.start()改走新开关,legacy alias 触发时 warn 一次。未动bridgeResources(...)(mcp-stdio-authority探针键);矩阵该行 env 引用已同步。os dev启动打印 MCP endpoint / skill URL / 可直接粘贴的claude mcp add命令(gate 在isMcpServerEnabled(),opt-out 零广告)。ai.exposedaction、~10 工具脊柱)在connect-mcp.mdx写成 v1 承诺政策 + metadata 可著述的后续方向。验证(rebase 后,本地)
packages/typesenv 20/20;packages/mcpplugin 14/14(向后兼容);dogfoodauthz-conformance+ feat(cli): make optional-plugin loading intent-driven, fail-fast on declared-but-missing (#1597) #3228 的showcase-mcp-http-identity(回归) 合计 13/13 —— 我的plugin.tsstdio 改动对 HTTP 面无回归,矩阵 ledger 仍 sound。turbo build(types/mcp/cli/verify/showcase 闭包,含 tsc)绿。不在本 PR(明确 defer)
Refs #3167(PR-B)、#3228(HTTP 证明,已合)、#3202(PR-A)、ADR-0096、ADR-0097。
🤖 Generated with Claude Code
https://claude.ai/code/session_0115eg8dAaCfWaDYYAm3ma36